package org.zyzboole.base.encrypt.crypto.encryption;


import com.eyelake.signature.base.util.encrypt.crypto.MD5Kit;

/**
 * @Author: zyz
 * @Date: 2022/2/14 15:14
 * @description
 */
public class MD5 implements EncryptDispose {

    private static class SingletonHolder {
        private static final MD5 INSTANCE = new MD5();
    }

    private MD5() {
    }

    public static final MD5 getInstance() {
        return SingletonHolder.INSTANCE;
    }

    @Override
    public String encrypt(String text) {
        return MD5Kit.makeMd5(text);
    }

    @Override
    public String decrypt(String encryptStr) {
        return MD5Kit.convertMd5(encryptStr);
    }
}
